//
//  BaseModel.m
//  NBTripe
//
//  Created by 陈曦 on 16/1/7.
//  Copyright © 2016年 Vicki. All rights reserved.
//

#import "BaseModel.h"

@implementation BaseModel

- (instancetype)initWithDataSource:(NSDictionary *)data {
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:data];
    }
    return self;
}



- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    if ([key isEqualToString:@"id"]) {
        self.nId = value;
    }
}

-(id)valueForUndefinedKey:(NSString *)key {
    return nil;
}


@end
